import { CreateBannerImageDto, UpdateBannerImageDto } from '@ai/entity';
import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common';
import { BannerImageService } from './banner-image.service';

@Controller('banner-image')
export class BannerImageController {
    constructor(private readonly bannerImageService: BannerImageService) {}

    @Post()
    create(@Body() createBannerImageDto: CreateBannerImageDto) {
        return this.bannerImageService.create(createBannerImageDto);
    }

    @Get()
    findAll() {
        return this.bannerImageService.findAll();
    }

    @Get(':id')
    findOne(@Param('id') id: string) {
        return this.bannerImageService.findOne(+id);
    }

    @Patch(':id')
    update(@Param('id') id: string, @Body() updateBannerImageDto: UpdateBannerImageDto) {
        return this.bannerImageService.update(+id, updateBannerImageDto);
    }

    @Delete(':id')
    remove(@Param('id') id: string) {
        return this.bannerImageService.remove(+id);
    }
}
